import { GSprite } from "../../../../../com/mui/controls/GSprite";
import { CrossGuildWarChooseForTopData } from "../data/CrossGuildWarChooseForTopData";
import { Language } from "../../../../../extend/language/Language";
import { DisplayUtil } from "../../../../common/DisplayUtil";
import { ECrossGuildWarFightStatus } from "../../../../../Message/Public/ECrossGuildWarFightStatus";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
type int = number;
//class CrossGuildWarChooseEnemyVSRender
    
    export  class CrossGuildWarChooseEnemyVSRender extends GSprite
    {
        constructor()
        {
            super();
            return;
        }

        public updateData(arg1: CrossGuildWarChooseForTopData): void
        {
            this._txtServerName.htmlText = Language.getStringByParam(80564, arg1.serverName);
            this._txtGuildName.htmlText = Language.getStringByParam(80563, arg1.guildName);
            return;
        }

        public updateStatus(arg1: int): void
        {
            DisplayUtil.removeMe(this._bmpIsWin);
            if (arg1 != ECrossGuildWarFightStatus._ECrossGuildWarFail) 
            {
                if (arg1 == ECrossGuildWarFightStatus._ECrossGuildWarSuccess) 
                {
                    this._bmpIsWin = ObjCreate.createBitmap(ImagesConst.CrossGuildWar_win, 150, 10, this);
                }
            }
            else 
            {
                this._bmpIsWin = ObjCreate.createBitmap(ImagesConst.CrossGuildWar_lost, 150, 10, this);
            }
            return;
        }

        protected /* override */ createDisposedChildrenImpl(): void
        {
            super.createDisposedChildren();
            ObjCreate.createBitmap(ImagesConst.CrossGuildWar_VSBg, 0, 0, this);
            this._txtServerName = ObjCreate.createGTextField("", 8, 8, 200, 20, this);
            this._txtGuildName = ObjCreate.createGTextField("", 8, 40, 200, 20, this);
            return;
        }

        /* internal */ /* var */_txtServerName: GTextFiled;

        /* internal */ /* var */_txtGuildName: GTextFiled;

        /* internal */ /* var */_bmpIsWin: Object /* flash.display.Bitmap */;
    }
